extends Node

enum logger_level {
	DEBUG=0,
	INFO=1,
	WARNING=2,
	ERROR=3
}

class Log:
	var lvl = logger_level.DEBUG
	func _init(level: logger_level) -> void:
		self.lvl = level
	func debug(s: String):
		if logger_level.DEBUG >= self.lvl:
			print("[DEBUG] %s"%s)
	func info(s: String):
		if logger_level.INFO >= self.lvl:
			print("[INFO] %s"%s)
	func warning(s: String):
		if logger_level.WARNING >= self.lvl:
			push_warning("[WARNING] %s"%s)
	func error(s: String):
		if logger_level.ERROR >= self.lvl:
			push_error("[ERROR] %s"%s)
